package com.xuxiangyang.competitionsystem.service;

import com.xuxiangyang.competitionsystem.entities.*;
import com.xuxiangyang.competitionsystem.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
//@Transactional
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User checkLoginByTel(User user) {
        return userMapper.checkLoginByTel(user);
    }

    @Override
    public User checkOldPass(User user) {
        return userMapper.checkOldPass(user);
    }

    @Override
    public void updatePass(User user) {
        userMapper.updatePass(user);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public List<School> getAllScholl() {
        return userMapper.getAllScholl();
    }

    @Override
    public List<User> getAllUser() {
        return userMapper.getAllUser();
    }

    @Override
    public void deleteUser(User user) {
        userMapper.deleteUser(user);
    }
}
